home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The X-Philes (2nd Revision)
/
The X-Philes Number 1 (1995).iso
/
xphiles
/
hp48_1
/
elispe
< prev
next >
Wrap
Text File
|
1995-03-31
|
1KB
|
41 lines
%%HP: T(3);
@ This program requires a single list of
@ three or five elements. The elements are
@ { Center XRadius YRadius SAngle EAngle }
@ where Center = the center of the ellipse.
@ (either pixel coordinate
@ or user unit coordinates)
@ XRadius = Horizontal radius.
@ YRadius = Vertical radius.
@ SAngle = Starting angle of ellipse
@ in degrees.
@ EAngle = Ending angle of ellipse
@ in degrees.
@ Note: SAngle and EAngle are used to
@ create arcs. They are optional.
@ If omitted, the program will draw
@ a full ellipse (SAngle = 00,
@ EAngle = 3600)
\<< OBJ\->
IF 3 ==
THEN 0 360
END 5 ROLL DUP
IF TYPE 5 ==
THEN PX\->C
END 5 ROLLD \->
cent xrad yrad sa
ea
\<< RCLF DEG xrad
sa COS * cent RE +
yrad sa SIN * cent
IM + R\->C sa ea
FOR an xrad an
COS * cent RE +
yrad an SIN * cent
IM + R\->C DUP ROT
LINE xrad yrad * \v/
INV 5 *
STEP DROP STOF
\>>
\>>